#ifndef APPLCATION_HPP
#define APPLCATION_HPP

#include "GlobalDefines.hpp"
#include "state/Settings.hpp"
#include "sfml/Graphics.hpp"

class App
{
public:
    // Variables

    enum MouseModes
    {
        Free,
        Capture,
        None,
    };

    // Functions

    static App& I();  // Instance access

    void CreateAppWindow (std::string title);

    sf::RenderWindow& GetWindow();

    Vec2i Size();

    MouseModes MouseMode(MouseModes state);

    MouseModes MouseMode();

    Vec2i MousePosition ();

    Vec3d ClearColor(Vec3d clr = Vec3d(-1,-1,-1));

    void SetTitle(std::string newTitle);

    bool Fullscreen();

    void Exit();

    bool Running();

    static bool Cleanup();

private:
    // Functionss

    App();

    App(const App& otherWindow);  // private copy constructor : non-copyable

    void operator = (const App& otherWindow); // private assignment operator : non-copyable

    // Variables

    sf::RenderWindow currentWindow;

    sf::ContextSettings windowSettings;

    MouseModes mouseMode;

    Vec3d clearColor;

    bool fullscreen;

    bool running;

    bool windowAlreadyCreated;

    static App* instance;
};

#endif
